<template>
  <a-popconfirm
    :title="title"
    ok-text="确认"
    cancel-text="取消"
    @confirm="onConfirm"
    :disabled="disabled"
  >
    <template #title>
      <slot name="title"></slot>
    </template>
    <a-button
      :type="type || 'link'"
      @click.stop=""
      :disabled="disabled"
      :size="size"
      ><template #icon><DeleteOutlined /></template> {{ label }}</a-button
    >
  </a-popconfirm>
</template>
<script setup>
const props = defineProps(["disabled", "title", "label", "size", "type"]);
const emits = defineEmits(["onDelete"]);

const onConfirm = () => {
  emits("onDelete");
};
</script>
<style scoped lang="less"></style>
